using Engine;
using Engine.OldSerialization;

namespace RuthlessConquest {
    public class GameListMessage : Message {
        public class Serializer : ISerializer<GameListMessage> {
            public void Serialize(InputArchive archive, ref GameListMessage value) {
                archive.Serialize("ServerPriority", ref value.ServerPriority);
                archive.Serialize("ServerName", ref value.ServerName);
                archive.Serialize("GameDescriptions", ref value.GameDescriptions);
            }

            public void Serialize(OutputArchive archive, GameListMessage value) {
                archive.Serialize("ServerPriority", value.ServerPriority);
                archive.Serialize("ServerName", value.ServerName);
                archive.Serialize("GameDescriptions", value.GameDescriptions);
            }
        }

        public int ServerPriority;

        public string ServerName;

        public DynamicArray<GameDescription> GameDescriptions = new();
    }
}